import request from '@/utils/request'

// 创建微信预支付订单
export function yuPayWxPay(data) {
    return request({
        'url': '/customer/wxPay/yuPayWxPay',
        'method': 'post',
        data: data
    })
}

// 保存客户手机号
export function customer(data) {
    return request({
        'url': '/customer/customer',
        'method': 'put',
        data: data
    })
}

// 查看测算结果
export function measure(data) {
    return request({
        'url': '/customer/customer/measure',
        'method': 'post',
        data: data
    })
}

//查看企业二维码
export function QYcode(data) {
    return request({
        'url': '/wxcode/wxcode/list',
        'method': 'get',
        params: data
    })
}

//获取prepayId
export function wxPay(data) {
    return request({
        url: '/weChat/v3/wxPay',
        method: 'post',
        data: data
    })
}

//扫码支付下单
export function createPayWxPay(data) {
    return request({
        url: '/customer/wxPay/createPayWxPay',
        method: 'post',
        data: data
    })
}

//jsApi支付下单
export function jsApiPay(data) {
    return request({
        url: '/customer/wxPay/jsApiPay',
        method: 'post',
        data: data
    })
}

//根据code获取openid
export function userInfo(data) {
    return request({
        url: '/customer/wxPay/userInfo',
        method: 'get',
        params: data
    })
}

//根据订单编号获取订单信息
export function paymentStatus(data) {
    return request({
        'url': '/payment/payment/list',
        'method': 'get',
        params: data
    })
}

//获取VIP价格
export function priceData(data) {
    return request({
        'url': '/price/price/list',
        'method': 'get',
        params: data
    })
}

//米花微信支付下单
export function mhWeChatPayOrder(data) {
    return request({
        url: '/customer/wxPay/mhWeChatPayOrder',
        method: 'post',
        data: data
    })
}

//微信支付下单-原生
export function weChatPayOrder(data) {
    return request({
        url: '/customer/wxPay/weChatPayOrder',
        method: 'post',
        data: data
    })
}

//米花支付宝手机支付下单
export function mhAliPayOrder(data) {
    return request({
        url: '/customer/wxPay/mhAliPayOrder',
        method: 'post',
        data: data
    })
}

//米花支付宝浏览器支付下单
export function mhAliWebPayOrder(data) {
    return request({
        url: '/customer/wxPay/mhAliWebPayOrder',
        method: 'post',
        data: data
    })
}


//支付宝原生手机支付下单
export function aliPayOrder(data) {
    return request({
        url: '/customer/wxPay/aliPayOrder',
        method: 'post',
        data: data
    })
}
//支付宝web支付--原生支付
export function aliWebPayOrder(data) {
    return request({
        url: '/customer/wxPay/aliWebPayOrder',
        method: 'post',
        data: data
    })
}
//获取用户详情
export function getCustomerInfoByOrderNum(data) {
    return request({
        'url': '/customer/customer/getCustomerInfoByOrderNum',
        'method': 'get',
        params: data
    })
}

//odcp
export function uploadConvertData(data) {
    return request({
        url: '/customer/wxPay/ocpc',
        method: 'post',
        data: data
    })
}

//新增统计
export function statistics(data) {
    return request({
        url: '/system/statistics',
        method: 'post',
        data: data
    })
}

//修改统计
export function updatePayStatusByOrderNum(data) {
    return request({
        url: '/system/statistics/updatePayStatusByOrderNum',
        method: 'put',
        data: data
    })
}

//根据订单编号获取json信息
export function getJsonByOrderNum(data) {
    return request({
        url: '/json/json/getJsonByOrderNum',
        method: 'get',
        params: data
    })
}

//根据域名获取信息
export function getDomainDataByDomain(data) {
    return request({
        url: '/system/domainConfig/getDomainDataByDomain',
        method: 'get',
        params: data
    })
}

//根据订单编号获取订单信息
export function getOrderDataByOrderNum(data) {
    return request({
        url: '/payment/payment/getOrderDataByOrderNum',
        method: 'get',
        params: data
    })
}
//新增ip地址与企业微信匹配
export function ipWxCode(data) {
    return request({
        url: '/system/ipWxCode',
        method: 'get',
        params: data
    })
}
//根据ip 获取企业微信图片
export function getWxCodeByIp(data) {
    return request({
        url: '/system/ipWxCode/getWxCodeByIp',
        method: 'get',
        params: data
    })
}
